package com.jeecg.userval.controller;

import com.jeecg.common.json.WebResult;
import com.jeecg.userval.service.UservalService;
import com.jeecg.util.AssertUtil;
import com.jeecg.util.weixin.DecodeUser;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Controller
@RequestMapping("/wechat/uservalContorller")
public class UservalContorller {
	/**
	 * Logger for this class
	 */
	private static final Logger logger = Logger.getLogger(UservalContorller.class);

	/**
	 *
	 */
	@Autowired
	private UservalService UservalService;

	@ResponseBody
	@RequestMapping(value = "/decodeUserInfo", method = RequestMethod.POST)
	public WebResult minidaoListDemo(String encryptedData, String iv, String code) {
		Map<String, Object> result = DecodeUser.decodeUserInfo(encryptedData, iv, code);
		return  new WebResult("1001", "获取成功", result);
	}

}
